﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DangNhap.aspx.cs" Inherits="HeThongSpa.Site.DangNhap" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml" style="background: url(/Templates/images/images.jpg) no-repeat center center fixed; -webkit-background-size: cover; -moz-background-size: cover; -o-background-size: cover; background-size: cover;">
<head runat="server">
    <title>Đăng nhập hệ thống</title>
    <link href="/Templates/css/bootstrap.css" rel="stylesheet" />
    <link href="/Templates/css/AdminLTE.css" rel="stylesheet" />
    <link href="/Templates/css/customer.css" rel="stylesheet" />
    <script src="/Templates/js/jquery-2.1.3.min.js"></script>
    <script src="/Templates/js/bootstrap.min.js"></script>
    <script src="/Templates/js/jquery.validate.min.js"></script>
    <script src="/Templates/js/additional-methods.min.js"></script>
</head>
<body class="login-box" style="margin-top: 200px;">
    <form id="form1" runat="server">
        <div class="box box-solid box-primary">
                <div class="box-header" style="padding: 15px;">
                    <h3 class="box-title">HỆ THỐNG QUẢN LÝ SPA</h3>
                </div>
                <div class="box-body" style="padding: 15px;">
                    <div class="form-group has-feedback">
                        <span class="glyphicon glyphicon-user form-control-feedback"></span>
                        <asp:TextBox ID="txtTaiKhoan" runat="server" CssClass="form-control" placeholder="Tài khoản"></asp:TextBox>
                    </div>
                    <div class="form-group has-feedback" style="margin-bottom: 0;">
                        <span class="glyphicon glyphicon-lock form-control-feedback"></span>
                        <asp:TextBox ID="txtMatKhau" runat="server" CssClass="form-control" TextMode="Password" placeholder="Mật khẩu"></asp:TextBox>
                    </div>
                </div>
                <div class="box-footer" style="padding: 15px;">
                    <asp:Button ID="btnDangNhap" runat="server" Text="Đăng nhập" CssClass="btn btn-primary btn-block btn-flat"
                        OnClick="btnDangNhap_Click" />
                </div>
            </div>
        <script type="text/javascript">
            var errempty = "&nbsp;&nbsp;Nhập (chọn) giá trị.";
            $(function () {
                $("#<%= txtTaiKhoan.ClientID%>").focus();
                $("form").each(function () {
                    $(this).validate({
                        onfocusout: false,
                        invalidHandler: function (form, validator) {
                            var errors = validator.numberOfInvalids();
                            if (errors) {
                                if ($(validator.errorList[0].element).parent().find("select").length > 0) {
                                    $(validator.errorList[0].element).parent().find("div.bootstrap-select > button").focus();
                                } else {
                                    validator.errorList[0].element.focus();
                                }
                            }
                        },
                        highlight: function (element) {
                            $(element).parent().addClass("has-error");
                        },
                        unhighlight: function (element) {
                            $(element).parent().removeClass("has-error");
                        },
                        errorPlacement: function (error, element) {
                            if ($(element).parent().find("select").length > 0) {
                                error.insertAfter($(element).parent().find("div.bootstrap-select"));
                            } else {
                                error.insertAfter($(element));
                            }
                        },
                        errorClass: "help-block",
                        ignore: ""
                    });
                });
            });

            function validationform() {
                $("#<%= txtTaiKhoan.ClientID %>").rules("add", {
                    required: true,
                    messages: {
                        required: "Nhập tài khoản"
                    }
                });
                $("#<%= txtMatKhau.ClientID %>").rules("add", {
                    required: true,
                    messages: {
                        required: "Nhập mật khẩu"
                    }
                });
            }
        </script>
    </form>
</body>
</html>
